<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--
@html_name: 01私有属性
@description: The past cannot be redeemed, the future can be changed.
@author: Jason Black
@create: 2023/6/27 19:49:57
-->
<script type="text/javascript">
  class student{
    // 公有属性
    name
    // 私有属性
    #age
    #sex
    constructor(name,age,sex) {
      this.name = name
      this.#age = age
      this.#sex = sex
    }
    print(){
      console.log(this.name,this.#age,this.#sex)
    }
  }
  const STU = new student("Jason",21,"female")
  STU.print()
</script>
</body>
</html>